{include file="public/header" /}

<div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
        <h1>添加员工</h1>
        <form class="layui-form" method="post" action="<?= url('doadd')?>">
            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <input class="layui-input layui-input-inline" type="text" name="Ename">
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">年龄</label>
                <input class="layui-input layui-input-inline" type="text" name="Eage">
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门</label>
                <div class="layui-input-inline">
                    <select name="Edeptno">
                        <?php if (isset($depts)): foreach ($depts as $item): ?>
                            <option value="<?= $item['Dno'] ?>"><?= $item['Dname'] ?></option>
                        <?php endforeach; endif; ?>
                    </select>
                </div>
            </div>
            <div id="submit" class="layui-form-item">
                <input onclick="window.history.back();" class="layui-btn layui-btn-primary" type="button" value="返回">
                <input class="layui-btn" type="submit" value="添加">
            </div>
        </form>
    </div>
</div>

<div class="layui-footer">
    <!-- 底部固定区域 -->
    © layui.com - 底部固定区域
</div>
</div>
<script src="__STATIC__/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['element', 'form'], function(){
        var element = layui.element;

    });
</script>
</body>
</html>